package 第五章多重循环;

public class 空 {
    public static void main(String[] args) {
        for (int i=1;i<=5;i++){
            for (int a=5-i;a>=1;a--){
                System.out.print(" ");
            }
            for (int j=1;j<=i*2-1;j++){
                if (j==1|j==i*2-1){
                    System.out.print("*");
                }else {
                    System.out.print(" ");
                }

            }
            System.out.println();
        }
        for (int i=5;i>=1;i--){
            for (int a=5-i;a>=1;a--){
                System.out.print(" ");
            }
            for (int j=1;j<=2*i-1;j++){
                if (j==1|j==i*2-1){
                    System.out.print("*");
                }else {
                    System.out.print(" ");
                }
            }
            System.out.println();
        }
    }
}